from flask import Flask
from .routes import main

def create_app():
    app = Flask(__name__, static_folder='static', template_folder='templates')
    app.secret_key = 'georgelovelucy'  # 新增，给cookie加密用
    app.register_blueprint(main)
    return app